home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / fun_game1.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  35.5 KB  |  1,229 lines

  1. function gameIntF()
  2. {
  3.    this.gameResetF();
  4.    this.gameLevelV = this.gameLevelV + 1;
  5.    var _loc4_ = Number(this.cubixMinV) + Number(this.gameLevelV);
  6.    if(this.gameLevelV % 4 != 0)
  7.    {
  8.       var _loc5_ = Number(this.cubixRandomMinV) + Number(this.gameLevelV) % 4 - 1;
  9.    }
  10.    else
  11.    {
  12.       _loc5_ = Number(this.cubixRandomMinV) + Number(this.gameLevelV) % 4;
  13.    }
  14.    this.cubixColorStartV = this.gameLevelV % 8 - 1;
  15.    if(this.cubixColorStartV < 0)
  16.    {
  17.       this.cubixColorStartV = 0;
  18.    }
  19.    trace("pieceV : " + _loc4_ + " -- randomV : " + _loc5_);
  20.    this.cubixPieceV = _loc4_;
  21.    this.cubixRowTotalV = _loc4_;
  22.    this.cubixColTotalV = _loc4_;
  23.    this.cubixTotalV = _loc4_ * _loc4_;
  24.    this.cubixWV = this.stageWV / this.cubixPieceV;
  25.    this.cubixHV = this.stageHV / this.cubixPieceV;
  26.    this.cubixIntXGapV = 0;
  27.    this.cubixIntYGapV = 0;
  28.    this.cubixRandomV = _loc5_;
  29.    this.itemChanceV = this.itemChanceMaxV;
  30.    this.lineStepV = 0;
  31.    this.lineStepTotalV = _loc4_;
  32.    var _loc3_ = 1;
  33.    while(_loc3_ <= this.cubixRowTotalV)
  34.    {
  35.       this["dataArr" + _loc3_] = new Array();
  36.       this["tempDataArr" + _loc3_] = new Array();
  37.       var _loc2_ = 1;
  38.       while(_loc2_ <= this.cubixColTotalV)
  39.       {
  40.          this["dataArr" + _loc3_][_loc2_ - 1] = 0;
  41.          this["tempDataArr" + _loc3_][_loc2_ - 1] = 0;
  42.          _loc2_ = _loc2_ + 1;
  43.       }
  44.       _loc3_ = _loc3_ + 1;
  45.    }
  46.    _loc3_ = 1;
  47.    while(_loc3_ <= this.cubixRandomV)
  48.    {
  49.       this["cubixTypeV" + _loc3_] = 0;
  50.       _loc3_ = _loc3_ + 1;
  51.    }
  52.    this.gameEndTrig = false;
  53.    this.makeCubixF();
  54.    this.visualInterfaceIntF(true);
  55.    this.visualPopupMF(true,"start");
  56. }
  57. function gameStartF()
  58. {
  59.    this.gameBtnControlF(true);
  60.    this.visualTimeMF(true);
  61.    this.gameSoundObj.start();
  62. }
  63. function gameEndF(typeV)
  64. {
  65.    if(!this.gameEndTrig)
  66.    {
  67.       this.gameSoundObj.stop();
  68.       if(typeV != "fail")
  69.       {
  70.          if(typeV == "clear")
  71.          {
  72.          }
  73.       }
  74.       trace("gameOver : " + typeV);
  75.       this.gameEndTrig = true;
  76.       this.visualTimeMF(false);
  77.       this.gameBtnControlF(false);
  78.       this.ID_delay = setInterval(popupDelayF,1000,typeV);
  79.    }
  80. }
  81. function popupDelayF(typeV)
  82. {
  83.    clearInterval(ID_delay);
  84.    visualPopupMF(true,typeV);
  85. }
  86. function gameResetF()
  87. {
  88.    var _loc3_ = 1;
  89.    while(_loc3_ <= this.cubixTotalV)
  90.    {
  91.       this["cubixM" + _loc3_].removeMovieClip();
  92.       _loc3_ = _loc3_ + 1;
  93.    }
  94.    _loc3_ = 1;
  95.    while(_loc3_ <= this.cubixRowTotalV)
  96.    {
  97.       this["dataArr" + _loc3_] = new Array();
  98.       this["tempDataArr" + _loc3_] = new Array();
  99.       var _loc2_ = 1;
  100.       while(_loc2_ <= this.cubixColTotalV)
  101.       {
  102.          this["dataArr" + _loc3_][_loc2_ - 1] = 0;
  103.          this["tempDataArr" + _loc3_][_loc2_ - 1] = 0;
  104.          _loc2_ = _loc2_ + 1;
  105.       }
  106.       _loc3_ = _loc3_ + 1;
  107.    }
  108. }
  109. function gameBtnControlF(bool)
  110. {
  111.    if(bool)
  112.    {
  113.       var _loc2_ = 1;
  114.       while(_loc2_ <= this.cubixTotalV)
  115.       {
  116.          this["cubixM" + _loc2_].enabled = true;
  117.          this["cubixM" + _loc2_].onPress = function()
  118.          {
  119.             this._parent.removeCubixF(this.typeV,this.xPosSV,this.yPosSV);
  120.          };
  121.          _loc2_ = _loc2_ + 1;
  122.       }
  123.       if(this.itemChanceV > 0)
  124.       {
  125.          this.btn_random.enabled = true;
  126.          this.btn_CCW.enabled = true;
  127.          this.btn_CW.enabled = true;
  128.          this.btn_random.onPress = function()
  129.          {
  130.             this.gotoAndStop("offL");
  131.             this._parent.visualItemCheckF("random");
  132.          };
  133.          this.btn_random.onRollOver = function()
  134.          {
  135.             this.onEnterFrame = function()
  136.             {
  137.                this.nextFrame();
  138.                if(this._currentframe == this._totalframes)
  139.                {
  140.                   this.onEnterFrame = null;
  141.                }
  142.             };
  143.          };
  144.          this.btn_random.onRollOut = function()
  145.          {
  146.             this.onEnterFrame = function()
  147.             {
  148.                this.prevFrame();
  149.                if(this._currentframe == 1)
  150.                {
  151.                   this.onEnterFrame = null;
  152.                }
  153.             };
  154.          };
  155.          this.btn_CCW.onPress = function()
  156.          {
  157.             this.gotoAndStop("offL");
  158.             this._parent.visualItemCheckF("rotation","CCW");
  159.          };
  160.          this.btn_CCW.onRollOver = function()
  161.          {
  162.             this.onEnterFrame = function()
  163.             {
  164.                this.nextFrame();
  165.                if(this._currentframe == this._totalframes)
  166.                {
  167.                   this.onEnterFrame = null;
  168.                }
  169.             };
  170.          };
  171.          this.btn_CCW.onRollOut = function()
  172.          {
  173.             this.onEnterFrame = function()
  174.             {
  175.                this.prevFrame();
  176.                if(this._currentframe == 1)
  177.                {
  178.                   this.onEnterFrame = null;
  179.                }
  180.             };
  181.          };
  182.          this.btn_CW.onPress = function()
  183.          {
  184.             this.gotoAndStop("offL");
  185.             this._parent.visualItemCheckF("rotation","CW");
  186.          };
  187.          this.btn_CW.onRollOver = function()
  188.          {
  189.             this.onEnterFrame = function()
  190.             {
  191.                this.nextFrame();
  192.                if(this._currentframe == this._totalframes)
  193.                {
  194.                   this.onEnterFrame = null;
  195.                }
  196.             };
  197.          };
  198.          this.btn_CW.onRollOut = function()
  199.          {
  200.             this.onEnterFrame = function()
  201.             {
  202.                this.prevFrame();
  203.                if(this._currentframe == 1)
  204.                {
  205.                   this.onEnterFrame = null;
  206.                }
  207.             };
  208.          };
  209.       }
  210.    }
  211.    else
  212.    {
  213.       _loc2_ = 1;
  214.       while(_loc2_ <= this.cubixTotalV)
  215.       {
  216.          this["cubixM" + _loc2_].enabled = false;
  217.          _loc2_ = _loc2_ + 1;
  218.       }
  219.       this.btn_random.enabled = false;
  220.       this.btn_CCW.enabled = false;
  221.       this.btn_CW.enabled = false;
  222.       this.btn_random.gotoAndStop("offL");
  223.       this.btn_CCW.gotoAndStop("offL");
  224.       this.btn_CW.gotoAndStop("offL");
  225.    }
  226. }
  227. function makeCubixF()
  228. {
  229.    var _loc6_ = 0;
  230.    var _loc5_ = 1;
  231.    while(_loc5_ <= this.cubixRowTotalV)
  232.    {
  233.       var _loc3_ = 1;
  234.       while(_loc3_ <= this.cubixColTotalV)
  235.       {
  236.          _loc6_ = _loc6_ + 1;
  237.          var _loc2_ = this.attachMovie("cubixM","cubixM" + _loc6_,_loc6_);
  238.          _loc2_._x = this.intXPosV + this.cubixWV / 2 + this.cubixWV * (_loc3_ - 1);
  239.          _loc2_._y = this.intYPosV + this.cubixHV / 2 + this.cubixHV * (_loc5_ - 1);
  240.          var _loc7_ = Number(random(this.cubixRandomV) + 1);
  241.          var _loc4_ = new Object();
  242.          _loc4_.nameV = _loc2_._name;
  243.          _loc4_.typeV = _loc7_;
  244.          _loc4_.checkTrig = false;
  245.          this["dataArr" + _loc5_][_loc3_ - 1] = _loc4_;
  246.          _loc2_.intF(_loc2_._name,_loc6_,_loc7_,this.cubixWV,this.cubixHV,_loc3_,_loc5_,this.cubixColorStartV);
  247.          _loc3_ = _loc3_ + 1;
  248.       }
  249.       _loc5_ = _loc5_ + 1;
  250.    }
  251. }
  252. function setPositionCubixF(typeNumV)
  253. {
  254.    this.gameBtnControlF(false);
  255.    this.cubixExistCountV = 0;
  256.    this.existCubixCheckF();
  257.    if(this.cubixExistTotalV != 0)
  258.    {
  259.       this.calCubixSpeedF();
  260.       var _loc3_ = this.cubixRowTotalV;
  261.       while(_loc3_ >= 1)
  262.       {
  263.          var _loc2_ = this.cubixColTotalV;
  264.          while(_loc2_ >= 1)
  265.          {
  266.             var _loc4_ = this[this["dataArr" + _loc3_][_loc2_ - 1].nameV];
  267.             _loc4_.changeInfoArrayPositionF(_loc2_,_loc3_);
  268.             var _loc5_ = this.intXPosV + this.cubixIntXGapV + this.cubixWV / 2 + this.cubixWV * (_loc2_ - 1);
  269.             var _loc6_ = this.intYPosV + this.cubixIntYGapV + this.cubixHV / 2 + this.cubixHV * (_loc3_ - 1);
  270.             _loc4_.changeInfoStagePositionF(_loc5_,_loc6_,typeNumV,this.cubixMoveSpeedV);
  271.             _loc2_ = _loc2_ - 1;
  272.          }
  273.          _loc3_ = _loc3_ - 1;
  274.       }
  275.    }
  276.    else
  277.    {
  278.       this.gameEndF("clear");
  279.    }
  280. }
  281. function rotationCubixF(dirTypeV)
  282. {
  283.    if(dirTypeV == "CCW")
  284.    {
  285.       var _loc3_ = 1;
  286.       while(_loc3_ <= this.cubixRowTotalV)
  287.       {
  288.          this["tempDataArr" + _loc3_] = new Array();
  289.          var _loc2_ = 1;
  290.          while(_loc2_ <= this.cubixColTotalV)
  291.          {
  292.             this["tempDataArr" + _loc3_][_loc2_ - 1] = this["dataArr" + _loc2_][this.cubixPieceV - _loc3_];
  293.             _loc2_ = _loc2_ + 1;
  294.          }
  295.          _loc3_ = _loc3_ + 1;
  296.       }
  297.    }
  298.    else if(dirTypeV == "CW")
  299.    {
  300.       _loc3_ = 1;
  301.       while(_loc3_ <= this.cubixRowTotalV)
  302.       {
  303.          this["tempDataArr" + _loc3_] = new Array();
  304.          _loc2_ = 1;
  305.          while(_loc2_ <= this.cubixColTotalV)
  306.          {
  307.             this["tempDataArr" + _loc3_][_loc2_ - 1] = this["dataArr" + Number(this.cubixPieceV - _loc2_ + 1)][_loc3_ - 1];
  308.             _loc2_ = _loc2_ + 1;
  309.          }
  310.          _loc3_ = _loc3_ + 1;
  311.       }
  312.    }
  313.    _loc3_ = 1;
  314.    while(_loc3_ <= this.cubixRowTotalV)
  315.    {
  316.       this["dataArr" + _loc3_] = this["tempDataArr" + _loc3_];
  317.       _loc3_ = _loc3_ + 1;
  318.    }
  319.    this.setPositionCubixF(1);
  320. }
  321. function checkCubixF(typeV, xPosV, yPosV)
  322. {
  323.    var _loc6_ = typeV;
  324.    var _loc5_ = 0;
  325.    var _loc4_ = new Array();
  326.    if(this["dataArr" + Number(yPosV - 1)][xPosV - 1].typeV == _loc6_)
  327.    {
  328.       _loc5_ = _loc5_ + 1;
  329.       _loc4_.push(this["dataArr" + Number(yPosV - 1)][xPosV - 1].nameV);
  330.    }
  331.    if(this["dataArr" + Number(yPosV + 1)][xPosV - 1].typeV == _loc6_)
  332.    {
  333.       _loc5_ = _loc5_ + 1;
  334.       _loc4_.push(this["dataArr" + Number(yPosV + 1)][xPosV - 1].nameV);
  335.    }
  336.    if(this["dataArr" + Number(yPosV)][xPosV - 2].typeV == _loc6_)
  337.    {
  338.       _loc5_ = _loc5_ + 1;
  339.       _loc4_.push(this["dataArr" + Number(yPosV)][xPosV - 2].nameV);
  340.    }
  341.    if(this["dataArr" + Number(yPosV)][xPosV].typeV == _loc6_)
  342.    {
  343.       _loc5_ = _loc5_ + 1;
  344.       _loc4_.push(this["dataArr" + Number(yPosV)][xPosV].nameV);
  345.    }
  346.    return _loc4_;
  347. }
  348. function removeCubixF(typeV, xPosV, yPosV)
  349. {
  350.    if(!this.removeCheckTrig)
  351.    {
  352.       this.removeCheckTrig = true;
  353.       var _loc14_ = this.checkCubixF(typeV,xPosV,yPosV);
  354.       var _loc5_ = new Array();
  355.       var _loc10_ = new Array();
  356.       var _loc9_ = new Array();
  357.       var _loc15_ = _loc14_.length;
  358.       var _loc13_ = 0;
  359.       var _loc12_ = false;
  360.       if(_loc15_ >= 1)
  361.       {
  362.          _loc5_ = _loc5_.concat(_loc14_);
  363.          while(!_loc12_)
  364.          {
  365.             var _loc11_ = _loc5_.length;
  366.             var _loc7_ = 0;
  367.             while(_loc7_ <= _loc11_ - 1)
  368.             {
  369.                var _loc4_ = this[_loc5_[_loc7_]];
  370.                if(!_loc4_.checkTrig)
  371.                {
  372.                   var _loc3_ = new Array();
  373.                   _loc3_ = this.checkCubixF(_loc4_.typeV,_loc4_.xPosSV,_loc4_.yPosSV).concat();
  374.                   if(_loc3_.length != 0)
  375.                   {
  376.                      _loc4_.checkTrig = true;
  377.                      var _loc8_ = _loc3_.length;
  378.                      var _loc2_ = 1;
  379.                      while(_loc2_ <= _loc8_)
  380.                      {
  381.                         var _loc6_ = Number(String(_loc3_[_loc2_ - 1]).slice(6));
  382.                         if(_loc9_[_loc6_ - 1] == undefined)
  383.                         {
  384.                            _loc9_[_loc6_ - 1] = _loc3_[_loc2_ - 1];
  385.                            _loc10_.push(_loc3_[_loc2_ - 1]);
  386.                         }
  387.                         _loc2_ = _loc2_ + 1;
  388.                      }
  389.                   }
  390.                }
  391.                _loc7_ = _loc7_ + 1;
  392.             }
  393.             _loc5_ = new Array();
  394.             _loc5_ = _loc10_.concat();
  395.             if(_loc5_.length == _loc13_)
  396.             {
  397.                this.removeSoundObj.start();
  398.                for(p in _loc5_)
  399.                {
  400.                   this.matrixInfoDeleteF(_loc5_[p]);
  401.                   this[_loc5_[p]].removeMovieClip();
  402.                }
  403.                _loc12_ = true;
  404.                this.removeCheckTrig = false;
  405.                this.existCubixCheckF();
  406.                this.matrixReformF();
  407.             }
  408.             else
  409.             {
  410.                _loc13_ = _loc5_.length;
  411.             }
  412.          }
  413.       }
  414.       else
  415.       {
  416.          this.removeCheckTrig = false;
  417.          this.visualMisClickMF(xPosV,yPosV);
  418.          this.visualScoreF(this.gameLevelV * 13 * -1);
  419.       }
  420.    }
  421. }
  422. function matrixInfoDeleteF(mcNameV)
  423. {
  424.    var _loc2_ = this[mcNameV];
  425.    var _loc3_ = _loc2_.xPosSV;
  426.    var _loc4_ = _loc2_.yPosSV;
  427.    this["dataArr" + _loc4_][_loc3_ - 1] = undefined;
  428. }
  429. function matrixReformF()
  430. {
  431.    var _loc6_ = new Array();
  432.    var _loc3_ = 1;
  433.    while(_loc3_ <= this.cubixRowTotalV)
  434.    {
  435.       this["tempDataArr" + _loc3_] = new Array();
  436.       _loc3_ = _loc3_ + 1;
  437.    }
  438.    var _loc2_ = 1;
  439.    while(_loc2_ <= this.cubixColTotalV)
  440.    {
  441.       var _loc4_ = this.cubixRowTotalV;
  442.       _loc3_ = this.cubixRowTotalV;
  443.       while(_loc3_ >= 1)
  444.       {
  445.          if(this["dataArr" + _loc3_][_loc2_ - 1] != undefined)
  446.          {
  447.             this["tempDataArr" + _loc4_].push(this["dataArr" + _loc3_][_loc2_ - 1]);
  448.             _loc4_ = _loc4_ - 1;
  449.          }
  450.          _loc3_ = _loc3_ - 1;
  451.       }
  452.       if(_loc4_ == this.cubixRowTotalV)
  453.       {
  454.          _loc6_.push("blank");
  455.       }
  456.       else
  457.       {
  458.          _loc6_.push("noBlank");
  459.       }
  460.       if(_loc4_ > 0)
  461.       {
  462.          _loc3_ = _loc4_;
  463.          while(_loc3_ >= 1)
  464.          {
  465.             this["tempDataArr" + _loc3_][_loc2_ - 1] = undefined;
  466.             _loc3_ = _loc3_ - 1;
  467.          }
  468.       }
  469.       _loc2_ = _loc2_ + 1;
  470.    }
  471.    var _loc5_ = 1;
  472.    while(_loc5_ <= this.cubixRowTotalV)
  473.    {
  474.       this["dataArr" + _loc5_] = this["tempDataArr" + _loc5_];
  475.       _loc5_ = _loc5_ + 1;
  476.    }
  477.    _loc3_ = 1;
  478.    while(_loc3_ <= this.cubixRowTotalV)
  479.    {
  480.       this["tempDataArr" + _loc3_] = new Array();
  481.       _loc4_ = this.cubixRowTotalV;
  482.       _loc2_ = this.cubixColTotalV;
  483.       while(_loc2_ >= 1)
  484.       {
  485.          if(_loc6_[_loc2_ - 1] == "noBlank")
  486.          {
  487.             _loc4_ = _loc4_ - 1;
  488.             this["tempDataArr" + _loc3_][_loc4_] = this["dataArr" + _loc3_][_loc2_ - 1];
  489.          }
  490.          _loc2_ = _loc2_ - 1;
  491.       }
  492.       _loc3_ = _loc3_ + 1;
  493.    }
  494.    _loc5_ = 1;
  495.    while(_loc5_ <= this.cubixRowTotalV)
  496.    {
  497.       this["dataArr" + _loc5_] = this["tempDataArr" + _loc5_];
  498.       _loc5_ = _loc5_ + 1;
  499.    }
  500.    this.setPositionCubixF(2);
  501. }
  502. function randomCubixF()
  503. {
  504.    var _loc7_ = new Array();
  505.    var _loc9_ = new Array();
  506.    var _loc14_ = false;
  507.    var _loc3_ = 1;
  508.    while(_loc3_ <= this.cubixRowTotalV)
  509.    {
  510.       var _loc2_ = 1;
  511.       while(_loc2_ <= this.cubixColTotalV)
  512.       {
  513.          if(this["dataArr" + _loc3_][_loc2_ - 1] != undefined)
  514.          {
  515.             _loc7_.push(this["dataArr" + _loc3_][_loc2_ - 1]);
  516.          }
  517.          _loc2_ = _loc2_ + 1;
  518.       }
  519.       _loc3_ = _loc3_ + 1;
  520.    }
  521.    var _loc11_ = 0;
  522.    var _loc8_ = _loc7_.length;
  523.    var _loc5_ = 0;
  524.    while(!_loc14_)
  525.    {
  526.       do
  527.       {
  528.          _loc5_ = random(_loc8_);
  529.       }
  530.       while(_loc9_[_loc5_] != undefined);
  531.       
  532.       _loc9_[_loc5_] = _loc7_[_loc11_].typeV;
  533.       _loc11_ = _loc11_ + 1;
  534.       if(_loc11_ == _loc8_)
  535.       {
  536.          _loc14_ = true;
  537.       }
  538.    }
  539.    var _loc4_ = 1;
  540.    while(_loc4_ <= _loc8_)
  541.    {
  542.       var _loc6_ = _loc7_[_loc4_ - 1].nameV;
  543.       var _loc10_ = _loc9_[_loc4_ - 1];
  544.       var _loc12_ = this[_loc6_].xPosSV;
  545.       var _loc13_ = this[_loc6_].yPosSV;
  546.       this["dataArr" + _loc13_][_loc12_ - 1].typeV = _loc10_;
  547.       this[_loc6_].changeTypeF(_loc10_);
  548.       _loc4_ = _loc4_ + 1;
  549.    }
  550. }
  551. function matrixRebuild()
  552. {
  553.    var _loc6_ = new Array();
  554.    var _loc7_ = new Array();
  555.    var _loc5_ = 1;
  556.    while(_loc5_ <= this.cubixRowTotalV - 1)
  557.    {
  558.       this["tempDataArr" + _loc5_] = new Array();
  559.       _loc5_ = _loc5_ + 1;
  560.    }
  561.    _loc5_ = this.cubixRowTotalV;
  562.    while(_loc5_ >= 1)
  563.    {
  564.       var _loc2_ = this.cubixColTotalV;
  565.       while(_loc2_ >= 1)
  566.       {
  567.          if(_loc2_ != 1 and _loc5_ != 1)
  568.          {
  569.             if(this["dataArr" + _loc5_][_loc2_ - 1] != undefined)
  570.             {
  571.                this["tempDataArr" + Number(_loc5_ - 1)][_loc2_ - 2] = this["dataArr" + _loc5_][_loc2_ - 1];
  572.             }
  573.             else
  574.             {
  575.                var _loc3_ = new Object();
  576.                _loc3_.xPosV = _loc2_ - 2;
  577.                _loc3_.yPosV = _loc5_ - 1;
  578.                _loc6_.push(_loc3_);
  579.             }
  580.          }
  581.          else if(this["dataArr" + _loc5_][_loc2_ - 1] != undefined)
  582.          {
  583.             _loc7_.push(this["dataArr" + _loc5_][_loc2_ - 1]);
  584.          }
  585.          _loc2_ = _loc2_ - 1;
  586.       }
  587.       _loc5_ = _loc5_ - 1;
  588.    }
  589.    if(_loc6_.length >= _loc7_.length)
  590.    {
  591.       var _loc4_ = 1;
  592.       while(_loc4_ <= _loc7_.length)
  593.       {
  594.          var _loc8_ = _loc6_[_loc4_ - 1].xPosV;
  595.          var _loc9_ = _loc6_[_loc4_ - 1].yPosV;
  596.          this["tempDataArr" + _loc9_][_loc8_] = _loc7_[_loc4_ - 1];
  597.          _loc4_ = _loc4_ + 1;
  598.       }
  599.       _loc5_ = this.cubixRowTotalV - 1;
  600.       while(_loc5_ >= 1)
  601.       {
  602.          _loc2_ = this.cubixColTotalV - 1;
  603.          while(_loc2_ >= 1)
  604.          {
  605.             if(this["tempDataArr" + _loc5_][_loc2_ - 1].typeV == undefined)
  606.             {
  607.                this["tempDataArr" + _loc5_][_loc2_ - 1] = undefined;
  608.             }
  609.             _loc2_ = _loc2_ - 1;
  610.          }
  611.          _loc5_ = _loc5_ - 1;
  612.       }
  613.       this["dataArr" + cubixRowTotalV] = new Array();
  614.       this.cubixRowTotalV = this.cubixRowTotalV - 1;
  615.       this.cubixColTotalV = this.cubixColTotalV - 1;
  616.       this.cubixPieceV = this.cubixPieceV - 1;
  617.       this.cubixIntXGapV += this.cubixWV / 2;
  618.       this.cubixIntYGapV += this.cubixHV / 2;
  619.       _loc5_ = 1;
  620.       while(_loc5_ <= this.cubixRowTotalV)
  621.       {
  622.          this["dataArr" + _loc5_] = new Array();
  623.          this["dataArr" + _loc5_] = this["tempDataArr" + _loc5_].concat();
  624.          _loc5_ = _loc5_ + 1;
  625.       }
  626.       this.existCubixCheckF();
  627.       this.setPositionCubixF(3);
  628.       this.lineStepV = this.lineStepV + 1;
  629.       this.visualResizeLineMF(true,this.cubixColTotalV * this.cubixWV + 4);
  630.    }
  631.    else
  632.    {
  633.       this.gameEndF("fail");
  634.    }
  635. }
  636. function moveEndCheckF1()
  637. {
  638.    this.cubixExistCountV = this.cubixExistCountV + 1;
  639.    if(this.cubixExistCountV == this.cubixExistTotalV)
  640.    {
  641.       this.cubixExistCountV = 0;
  642.       this.matrixReformF();
  643.    }
  644. }
  645. function moveEndCheckF2()
  646. {
  647.    this.cubixExistCountV = this.cubixExistCountV + 1;
  648.    if(this.cubixExistCountV == this.cubixExistTotalV and !this.gameEndTrig)
  649.    {
  650.       this.gameEndCheckF();
  651.       this.cubixExistCountV = 0;
  652.    }
  653. }
  654. function existCubixCheckF()
  655. {
  656.    this.cubixExistTotalV = 0;
  657.    var _loc3_ = 1;
  658.    while(_loc3_ <= this.cubixRowTotalV)
  659.    {
  660.       var _loc2_ = 1;
  661.       while(_loc2_ <= this.cubixColTotalV)
  662.       {
  663.          if(this["dataArr" + _loc3_][_loc2_ - 1] != undefined)
  664.          {
  665.             this.cubixExistTotalV = this.cubixExistTotalV + 1;
  666.          }
  667.          _loc2_ = _loc2_ + 1;
  668.       }
  669.       _loc3_ = _loc3_ + 1;
  670.    }
  671. }
  672. function gameEndCheckF()
  673. {
  674.    var _loc6_ = 0;
  675.    var _loc7_ = false;
  676.    var _loc5_ = 1;
  677.    while(_loc5_ <= this.cubixRandomV)
  678.    {
  679.       this["cubixTypeV" + _loc5_] = 0;
  680.       _loc5_ = _loc5_ + 1;
  681.    }
  682.    var _loc4_ = 1;
  683.    while(_loc4_ <= this.cubixRowTotalV)
  684.    {
  685.       var _loc2_ = 1;
  686.       while(_loc2_ <= this.cubixColTotalV)
  687.       {
  688.          var _loc3_ = this["dataArr" + _loc4_][_loc2_ - 1].typeV;
  689.          this["cubixTypeV" + _loc3_]++;
  690.          _loc2_ = _loc2_ + 1;
  691.       }
  692.       _loc4_ = _loc4_ + 1;
  693.    }
  694.    _loc5_ = 1;
  695.    while(_loc5_ <= this.cubixRandomV)
  696.    {
  697.       if(this["cubixTypeV" + _loc5_] >= 2)
  698.       {
  699.          _loc7_ = true;
  700.          break;
  701.       }
  702.       _loc5_ = _loc5_ + 1;
  703.    }
  704.    _loc4_ = 1;
  705.    while(_loc4_ <= this.cubixRowTotalV)
  706.    {
  707.       _loc2_ = 1;
  708.       while(_loc2_ <= this.cubixColTotalV)
  709.       {
  710.          _loc3_ = this["dataArr" + _loc4_][_loc2_ - 1].typeV;
  711.          this["cubixTypeV" + _loc3_]++;
  712.          if(_loc3_ != undefined)
  713.          {
  714.             if(this.checkCubixF(_loc3_,_loc2_,_loc4_).length != 0)
  715.             {
  716.                break;
  717.             }
  718.             _loc6_ = _loc6_ + 1;
  719.          }
  720.          _loc2_ = _loc2_ + 1;
  721.       }
  722.       _loc4_ = _loc4_ + 1;
  723.    }
  724.    if(_loc6_ == this.cubixExistTotalV)
  725.    {
  726.       if(this.itemChanceV > 0)
  727.       {
  728.          if(!_loc7_)
  729.          {
  730.             this.gameEndF("clear");
  731.          }
  732.          else
  733.          {
  734.             this.gameBtnControlF(true);
  735.          }
  736.       }
  737.       else if(this.itemChanceV <= 0)
  738.       {
  739.          this.gameEndF("clear");
  740.       }
  741.    }
  742.    else
  743.    {
  744.       this.gameBtnControlF(true);
  745.    }
  746. }
  747. function calPersentF()
  748. {
  749.    this.existCubixCheckF();
  750.    var _loc2_ = undefined;
  751.    var _loc3_ = undefined;
  752.    _loc2_ = Math.abs(this.cubixExistTotalV / this.cubixTotalV);
  753.    _loc3_ = _loc2_ * 100 - Math.floor(_loc2_ * 100);
  754.    if(_loc3_ != 0)
  755.    {
  756.       _loc3_ = 1;
  757.    }
  758.    _loc2_ = Math.round(100 - _loc2_ * 100) - _loc3_;
  759.    return _loc2_;
  760. }
  761. function calCubixSpeedF()
  762. {
  763.    var _loc4_ = 0;
  764.    var _loc5_ = 0;
  765.    var _loc3_ = 1;
  766.    while(_loc3_ <= this.cubixRowTotalV)
  767.    {
  768.       var _loc2_ = 1;
  769.       while(_loc2_ <= this.cubixColTotalV)
  770.       {
  771.          if(this["dataArr" + _loc3_][_loc2_ - 1] != undefined)
  772.          {
  773.             _loc4_ = _loc4_ + 1;
  774.          }
  775.          _loc2_ = _loc2_ + 1;
  776.       }
  777.       _loc3_ = _loc3_ + 1;
  778.    }
  779.    _loc5_ = Math.round(_loc4_ / this.cubixMoveSpeedStepV);
  780.    this.cubixMoveSpeedV = this.cubixMoveSpeedMinV + _loc5_ * 0.025;
  781. }
  782. function visualItemCheckF(typeV1, typeV2)
  783. {
  784.    this.itemChanceV = this.itemChanceV - 1;
  785.    if(this.itemChanceV >= 0)
  786.    {
  787.       if(typeV1 == "rotation")
  788.       {
  789.          this.itemSoundObj1.start();
  790.          this.rotationCubixF(typeV2);
  791.       }
  792.       else if(typeV1 == "random")
  793.       {
  794.          this.itemSoundObj2.start();
  795.          this.visualRandomF();
  796.       }
  797.       this.visualItemM.win.text = this.itemChanceV;
  798.       this.visualItemM.gotoAndStop("s" + this.itemChanceV + "L");
  799.       if(this.itemChanceV == 0)
  800.       {
  801.          this.btn_random.enabled = false;
  802.          this.btn_CCW.enabled = false;
  803.          this.btn_CW.enabled = false;
  804.       }
  805.    }
  806.    else
  807.    {
  808.       this.itemChanceV = 0;
  809.       this.btn_random.enabled = false;
  810.       this.btn_CCW.enabled = false;
  811.       this.btn_CW.enabled = false;
  812.    }
  813. }
  814. function visualRandomF()
  815. {
  816.    var _loc2_ = this.createEmptyMovieClip("randomM",this.randomDepthV);
  817.    this.gameBtnControlF(false);
  818.    _loc2_.countV = 0;
  819.    _loc2_.onEnterFrame = function()
  820.    {
  821.       this._parent.randomCubixF();
  822.       this.countV = this.countV + 1;
  823.       if(this.countV >= 10)
  824.       {
  825.          this._parent.gameEndCheckF();
  826.          this.removeMovieClip();
  827.          this.onEnterFrame = null;
  828.       }
  829.    };
  830. }
  831. function visualTimeMF(bool)
  832. {
  833.    var _loc2_ = this.visualTimeM;
  834.    if(bool)
  835.    {
  836.       _loc2_.fpsV = this.fpsV;
  837.       _loc2_.timeV = 0;
  838.       _loc2_.timeSV = 0;
  839.       _loc2_.timeMaxV = _loc2_.fpsV * this.gameLimitSecV;
  840.       _loc2_.onEnterFrame = function()
  841.       {
  842.          if(!this._parent.popupTrig)
  843.          {
  844.             this.timeV = this.timeV + 1;
  845.             this.timeSV = this.timeMaxV - this.timeV;
  846.             if(this.timeSV <= 0)
  847.             {
  848.                this._parent.matrixRebuild();
  849.                this.timeV = 0;
  850.             }
  851.             this._parent.visualTimeM.barM._xscale = this.timeSV / this.timeMaxV * 100;
  852.             this._parent.visualTimeM.arrowM._x = this._parent.visualTimeM.barM._x + this._parent.visualTimeM.barM._width;
  853.          }
  854.       };
  855.    }
  856.    else
  857.    {
  858.       _loc2_.onEnterFrame = null;
  859.    }
  860. }
  861. function visualPopupMF(bool, typeV)
  862. {
  863.    if(bool)
  864.    {
  865.       this.openPopupTrig = true;
  866.       var _loc2_ = this.attachMovie("visualPopupM","visualPopupM",this.popupDepthV);
  867.       _loc2_._x = this.intXPosV + this.stageWV / 2;
  868.       _loc2_._y = this.intYPosV + this.stageHV / 2;
  869.       _loc2_.gotoAndStop(typeV + "L");
  870.    }
  871.    else
  872.    {
  873.       this.openPopupTrig = false;
  874.       this.visualPopupM.gotoAndStop("offL");
  875.    }
  876. }
  877. function visualMisClickMF(xPosV, yPosV)
  878. {
  879.    var _loc3_ = this.getNextHighestDepth();
  880.    var _loc2_ = this.attachMovie("baloomM","baloomM" + _loc3_,_loc3_);
  881.    _loc2_._x = this.intXPosV + this.cubixIntXGapV + this.cubixWV / 2 + this.cubixWV * (xPosV - 1);
  882.    _loc2_._y = this.intYPosV + this.cubixIntYGapV + this.cubixHV / 2 + this.cubixHV * (yPosV - 1);
  883.    _loc2_.countV = 0;
  884.    _loc2_.onEnterFrame = function()
  885.    {
  886.       if(!this._parent.gameEndTrig)
  887.       {
  888.          this.countV = this.countV + 1;
  889.          if(this.countV >= 10)
  890.          {
  891.             this.removeMovieClip();
  892.             this.onEnterFrame = null;
  893.          }
  894.       }
  895.       else
  896.       {
  897.          this.removeMovieClip();
  898.          this.onEnterFrame = null;
  899.       }
  900.    };
  901. }
  902. function visualResizeLineMF(bool, widthV)
  903. {
  904.    if(bool)
  905.    {
  906.       this.lineM.targetWidthV = widthV;
  907.       this.lineM.speedV = 0.25;
  908.       this.lineM.onEnterFrame = function()
  909.       {
  910.          this._width += (this.targetWidthV - this._width) * this.speedV;
  911.          this._height = this._width;
  912.          if(Math.abs(this.targetWidthV - this._width) < 1)
  913.          {
  914.             this._width = this.targetWidthV;
  915.             this._height = this.targetWidthV;
  916.             this.onEnterFrame = null;
  917.          }
  918.       };
  919.    }
  920.    else
  921.    {
  922.       this.lineM._width = this.stageWV;
  923.       this.lineM._height = this.stageHV;
  924.    }
  925. }
  926. function visualInterfaceIntF(bool)
  927. {
  928.    if(bool)
  929.    {
  930.       this.visualLevelM.win.text = this.gameLevelV;
  931.       this.visualScoreM.win.text = this.gameScoreV;
  932.       this.visualItemM.win.text = this.itemChanceMaxV;
  933.       this.visualItemM.gotoAndStop("s3L");
  934.       this.visualResizeLineMF(false);
  935.    }
  936.    else
  937.    {
  938.       this.visualLevelM.win.text = 0;
  939.       this.visualScoreM.win.text = 0;
  940.       this.visualItemM.win.text = this.itemChanceMaxV;
  941.       this.visualItemM.gotoAndStop("s3L");
  942.       this.visualResizeLineMF(false);
  943.    }
  944. }
  945. function visualScoreF(numV)
  946. {
  947.    this.gameScoreV += Number(numV);
  948.    if(this.gameScoreV <= 0)
  949.    {
  950.       this.gameScoreV = 0;
  951.    }
  952.    this.visualScoreM.win.text = this.gameScoreV;
  953. }
  954. function visualTotalScoreF(typeV)
  955. {
  956.    var _loc2_ = this.visualPopupM.visualEndM;
  957.    _loc2_.levelV = this.gameLevelV;
  958.    _loc2_.persentageV = 0;
  959.    _loc2_.persentageSV = this.calPersentF();
  960.    _loc2_.timeBonusV = 0;
  961.    _loc2_.timeBonusSV = (this.lineStepTotalV - this.lineStepV) * 30;
  962.    _loc2_.itemBonusV = 0;
  963.    _loc2_.itemBonusSV = this.itemChanceV * 100;
  964.    _loc2_.scoreV = 0;
  965.    _loc2_.pageStepV = 1;
  966.    _loc2_.soundCountV = 0;
  967.    _loc2_.soundStepV = 4;
  968.    if(typeV == "clear")
  969.    {
  970.       _loc2_.scoreSV = Number(_loc2_.persentageSV) * 10 + Number(_loc2_.timeBonusSV) + Number(_loc2_.itemBonusSV);
  971.       _loc2_.onEnterFrame = function()
  972.       {
  973.          if(this.pageStepV == 1)
  974.          {
  975.             this.levelWin.text = this.levelV;
  976.             this.pageStepV = this.pageStepV + 1;
  977.             this.soundCountV = 0;
  978.             this.gotoAndStop("s" + this.pageStepV + "L");
  979.          }
  980.          else if(this.pageStepV == 2)
  981.          {
  982.             this.persentageV += 3;
  983.             this.soundCountV = this.soundCountV + 1;
  984.             if(this.soundCountV % this.soundStepV == 1)
  985.             {
  986.                this._parent._parent.scoreSoundObj.start();
  987.             }
  988.             if(this.persentageV >= this.persentageSV)
  989.             {
  990.                this.persentageV = this.persentageSV;
  991.                this.persentageWin.text = this.persentageV + " %";
  992.                this.pageStepV = this.pageStepV + 1;
  993.                this.soundCountV = 0;
  994.                this.gotoAndStop("s" + this.pageStepV + "L");
  995.             }
  996.             else
  997.             {
  998.                this.persentageWin.text = this.persentageV + " %";
  999.             }
  1000.          }
  1001.          else if(this.pageStepV == 3)
  1002.          {
  1003.             this.timeBonusV += 5;
  1004.             this.soundCountV = this.soundCountV + 1;
  1005.             if(this.soundCountV % this.soundStepV == 1)
  1006.             {
  1007.                this._parent._parent.scoreSoundObj.start();
  1008.             }
  1009.             if(this.timeBonusV >= this.timeBonusSV)
  1010.             {
  1011.                this.timeBonusV = this.timeBonusSV;
  1012.                this.timeBonusWin.text = this.timeBonusSV;
  1013.                this.pageStepV = this.pageStepV + 1;
  1014.                this.soundCountV = 0;
  1015.                this.gotoAndStop("s" + this.pageStepV + "L");
  1016.             }
  1017.             else
  1018.             {
  1019.                this.timeBonusWin.text = this.timeBonusV;
  1020.             }
  1021.          }
  1022.          else if(this.pageStepV == 4)
  1023.          {
  1024.             this.itemBonusV += 30;
  1025.             this.soundCountV = this.soundCountV + 1;
  1026.             if(this.soundCountV % this.soundStepV == 1)
  1027.             {
  1028.                this._parent._parent.scoreSoundObj.start();
  1029.             }
  1030.             if(this.itemBonusV >= this.itemBonusSV)
  1031.             {
  1032.                this.itemBonusV = this.itemBonusSV;
  1033.                this.itemBonusWin.text = this.itemBonusSV;
  1034.                this.pageStepV = this.pageStepV + 1;
  1035.                this.soundCountV = 0;
  1036.                this.gotoAndStop("s" + this.pageStepV + "L");
  1037.             }
  1038.             else
  1039.             {
  1040.                this.itemBonusWin.text = this.itemBonusV;
  1041.             }
  1042.          }
  1043.          else if(this.pageStepV == 5)
  1044.          {
  1045.             this.scoreV += 30;
  1046.             this.soundCountV = this.soundCountV + 1;
  1047.             if(this.soundCountV % this.soundStepV == 1)
  1048.             {
  1049.                this._parent._parent.scoreSoundObj.start();
  1050.             }
  1051.             if(this.scoreV >= this.scoreSV)
  1052.             {
  1053.                this.scoreV = this.scoreSV;
  1054.                this.totalScoreWin.text = this.scoreSV;
  1055.                this.pageStepV = this.pageStepV + 1;
  1056.                this.soundCountV = 0;
  1057.                this.gotoAndStop("s" + this.pageStepV + "L");
  1058.             }
  1059.             else
  1060.             {
  1061.                this.totalScoreWin.text = this.scoreV;
  1062.             }
  1063.          }
  1064.          else if(this.pageStepV == 6)
  1065.          {
  1066.             this._parent._parent.visualScoreF(this.scoreSV);
  1067.             this.btn_next.onPress = function()
  1068.             {
  1069.                this._parent._parent._parent.gameIntF();
  1070.                this._parent._parent._parent.visualPopupMF(false);
  1071.             };
  1072.             this.onEnterFrame = null;
  1073.          }
  1074.       };
  1075.    }
  1076.    else if(typeV == "fail")
  1077.    {
  1078.       _loc2_.scoreSV = Number(_loc2_.persentageSV) * 10;
  1079.       _loc2_.onEnterFrame = function()
  1080.       {
  1081.          if(this.pageStepV == 1)
  1082.          {
  1083.             this.levelWin.text = this.levelV;
  1084.             this.pageStepV = this.pageStepV + 1;
  1085.             this.soundCountV = 0;
  1086.             this.gotoAndStop("s" + this.pageStepV + "L");
  1087.          }
  1088.          else if(this.pageStepV == 2)
  1089.          {
  1090.             this.persentageV += 3;
  1091.             this.soundCountV = this.soundCountV + 1;
  1092.             if(this.soundCountV % this.soundStepV == 1)
  1093.             {
  1094.                this._parent._parent.scoreSoundObj.start();
  1095.             }
  1096.             if(this.persentageV >= this.persentageSV)
  1097.             {
  1098.                this.persentageV = this.persentageSV;
  1099.                this.persentageWin.text = this.persentageV + " %";
  1100.                this.pageStepV = this.pageStepV + 1;
  1101.                this.soundCountV = 0;
  1102.                this.gotoAndStop("s" + this.pageStepV + "L");
  1103.             }
  1104.             else
  1105.             {
  1106.                this.persentageWin.text = this.persentageV + " %";
  1107.             }
  1108.          }
  1109.          else if(this.pageStepV == 3)
  1110.          {
  1111.             this.scoreV += 30;
  1112.             this.soundCountV = this.soundCountV + 1;
  1113.             if(this.soundCountV % this.soundStepV == 1)
  1114.             {
  1115.                this._parent._parent.scoreSoundObj.start();
  1116.             }
  1117.             if(this.scoreV >= this.scoreSV)
  1118.             {
  1119.                this.scoreV = this.scoreSV;
  1120.                this.levelScoreWin.text = this.scoreSV;
  1121.                this.pageStepV = this.pageStepV + 1;
  1122.                this.soundCountV = 0;
  1123.                this.gotoAndStop("s" + this.pageStepV + "L");
  1124.             }
  1125.             else
  1126.             {
  1127.                this.levelScoreWin.text = this.scoreV;
  1128.             }
  1129.          }
  1130.          else if(this.pageStepV == 4)
  1131.          {
  1132.             this._parent._parent.visualScoreF(this.scoreSV);
  1133.             this.totalScoreWin.text = this._parent._parent.gameScoreV;
  1134.             this.pageStepV = this.pageStepV + 1;
  1135.             this.gotoAndStop("s" + this.pageStepV + "L");
  1136.          }
  1137.          else if(this.pageStepV == 5)
  1138.          {
  1139.             this.btn_submit.onPress = function()
  1140.             {
  1141.                this._parent._parent._parent.gameLevelV = 0;
  1142.                this._parent._parent._parent.gameScoreV = 0;
  1143.                this._parent._parent._parent.gameResetF();
  1144.                this._parent._parent._parent.gotoAndStop("introL");
  1145.                this._parent._parent._parent.visualPopupMF(false);
  1146.             };
  1147.             this.btn_replay.onPress = function()
  1148.             {
  1149.                this._parent._parent._parent.gameLevelV = 0;
  1150.                this._parent._parent._parent.gameScoreV = 0;
  1151.                this._parent._parent._parent.visualInterfaceIntF(false);
  1152.                this._parent._parent._parent.gameIntF();
  1153.                this._parent._parent._parent.visualPopupMF(false);
  1154.             };
  1155.             this.onEnterFrame = null;
  1156.          }
  1157.       };
  1158.    }
  1159. }
  1160. stop();
  1161. getURL("FSCommand:allowScale",false);
  1162. Stage.showMenu = false;
  1163. this.stageXPosMinV = 192;
  1164. this.stageXPosMaxV = 476;
  1165. this.stageYPosMinV = 49;
  1166. this.stageYPosMaxV = 333;
  1167. this.intXPosV = this.stageXPosMinV;
  1168. this.intYPosV = this.stageYPosMinV;
  1169. this.bottomXPosV = this.stageXPosMinV;
  1170. this.bottomYPosV = this.stageYPosMaxV;
  1171. this.stageWV = this.stageXPosMaxV - this.stageXPosMinV;
  1172. this.stageHV = this.stageYPosMaxV - this.stageYPosMinV;
  1173. this.cubixPieceV = 0;
  1174. this.cubixRowTotalV = 0;
  1175. this.cubixColTotalV = 0;
  1176. this.cubixTotalV = 0;
  1177. this.cubixMinV = 4;
  1178. this.cubixRandomV = 0;
  1179. this.cubixRandomMinV = 3;
  1180. this.cubixColorStartV = 0;
  1181. this.cubixWV = 0;
  1182. this.cubixHV = 0;
  1183. this.cubixIntXGapV = 0;
  1184. this.cubixIntYGapV = 0;
  1185. this.cubixExistTotalV = 0;
  1186. this.cubixExistCountV = 0;
  1187. this.cubixMoveSpeedMinV = 0.2;
  1188. this.cubixMoveSpeedV = 0;
  1189. this.cubixMoveSpeedStepV = 25;
  1190. this.fpsV = 40;
  1191. this.gameLevelV = 0;
  1192. this.gameScoreV = 0;
  1193. this.gameLimitSecV = 10;
  1194. this.lineStepV = 0;
  1195. this.lineStepTotalV = 0;
  1196. this.gameEndTrig = false;
  1197. this.itemChanceV = 0;
  1198. this.itemChanceMaxV = 3;
  1199. this.removeCheckTrig = false;
  1200. this.openPopupTrig = false;
  1201. this.popupDepthV = 1000;
  1202. this.randomDepthV = 1001;
  1203. this.mainSoundObj = new Sound(this);
  1204. this.mainSoundObj.setVolume(50);
  1205. this.introSoundObj = new Sound();
  1206. this.introSoundObj.attachSound("introSound");
  1207. this.gameSoundObj = new Sound();
  1208. this.gameSoundObj.attachSound("gameSound");
  1209. this.gameSoundObj.onSoundComplete = function()
  1210. {
  1211.    this.start();
  1212. };
  1213. this.btnSoundObj = new Sound();
  1214. this.btnSoundObj.attachSound("btnSound");
  1215. this.clearSoundObj = new Sound();
  1216. this.clearSoundObj.attachSound("clearSound");
  1217. this.failSoundObj = new Sound();
  1218. this.failSoundObj.attachSound("failSound");
  1219. this.scoreSoundObj = new Sound();
  1220. this.scoreSoundObj.attachSound("scoreSound");
  1221. this.levelSoundObj = new Sound();
  1222. this.levelSoundObj.attachSound("levelSound");
  1223. this.itemSoundObj1 = new Sound();
  1224. this.itemSoundObj1.attachSound("itemSound1");
  1225. this.itemSoundObj2 = new Sound();
  1226. this.itemSoundObj2.attachSound("itemSound2");
  1227. this.removeSoundObj = new Sound();
  1228. this.removeSoundObj.attachSound("removeSound");
  1229.